package com.crazy.crazybusinessservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crazy.crazymodel.model.entity.BankCardBalance;

import java.math.BigDecimal;

public interface BankCardBalanceService extends IService<BankCardBalance> {
    /**
     * 银行卡支出,此时未进行实际金额扣除
     * @param cardId 银行卡id
     * @param amount 交易金额
     * @return
     */
    public String pay(String cardId, BigDecimal amount);

    /**
     * 银行卡进账,与赎回区分
     * @param cardId 银行卡id
     * @param amount 交易金额
     * @return
     */
    public String revenue(String cardId,BigDecimal amount);

    /**
     * 银行卡内金额赎回
     * @param cardId
     * @param amount
     * @return
     */
    public String redeem(String cardId,BigDecimal amount);


    public String freezeBalanceChancel(String cardID,BigDecimal amount);

    /**
     * 银行卡内金额清算
     * @param cardId
     * @return
     */
    public String liquidate(String cardId);

    /**
     * 银行卡内金额清算(根据给定金额进行清算)
     * @param cardId
     * @param amount
     * @return
     */
    public String liquidate(String cardId,BigDecimal amount);


}
